<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../css/style.css" />		
		<script type="text/javascript" src="../js/head_public.js" ></script>
		<style>
			.jifen-number{font-size: 14px;color: #666666;}
			.jifen-number span{color: #ff7e00;}
			.zhichu{color: #323232;font-size: 16px;}
			.jifen-list li{border-bottom: 1px solid #EEEEEE;background: #fff;padding: 0.2rem;}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav ding-bar">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">积分消费记录</h1>
		</header>
		<div class="mui-content">
			<ul class="jifen-list">
				<!--<li>
					<div class="mui-row">
						<div class="mui-col-xs-6 zhichu" >支出</div>						
					    <div class="mui-col-xs-6 zhichu" style="text-align: right;color: #666666;font-size: 14px;">2019-12-12</div>
					</div>
					<div class="mui-row">
						<div class="mui-col-xs-9 jifen-number"><span>[支出原因]</span>速度国家开发士大夫速度国家开发士大夫</div>
					    <div class="mui-col-xs-3 zhichu" style="text-align: center;" >-20</div>
					</div>
					
				</li>-->
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/jquery-1.8.0.min.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/session.js"></script>
		<script type="text/javascript">
			mui(".geren-list").on("tap","a[data-href]",function(){
				mui.openWindow({url:$(this).attr("data-href")})
			})
			$(function(){
				var userid=getCookie("userid");
				if(userid==null||userid==""){
					alert("您还没有登录，请先登录")
					location.href="../public/login.html"
				}else{
					var param={};
					param.member_id=userid;
					$.post(net+"/public/index.php?s=api/Predeposit/points_list	",param,function(res){
						if(res.code=="200"){
							if(res.result!==null&&res.result.length!=0){
								var str="";
								$.each(res.result,function(index,val){
									var pl_points="";
									var jf_type="";
									if(this.type=="收入"){
										jf_type='<span>[收入原因]</span>'
										 pl_points="+"+this.pl_points;
									}else{
										jf_type='<span>[支出原因]</span>'
										 pl_points=this.pl_points;
									}
								
                                    str+='<li><div class="mui-row" style="margin-bottom:5px;"><div class="mui-col-xs-6 zhichu" >'+this.type+'</div><div class="mui-col-xs-6 zhichu" style="text-align: right;color: #666666;font-size: 14px;">'+this.pl_addtime+'</div></div>'
                                       +'<div class="mui-row"><div class="mui-col-xs-9 jifen-number">'+jf_type+this.pl_desc+'</div><div class="mui-col-xs-3 zhichu" style="text-align: center;" >'+pl_points+'</div></div></li>'		
								})
								$(".jifen-list").append(str)
							}else{
								mui.toast("您暂时还没有进行积分交易")
							}
						}
					})
				}
			})
		</script>
	</body>
</html>